export const mockTableData = [
  // {
  //   id: '1',
  //   title: '',
  //   price: '',
  // },
]

export function adapterCloudListData(data, columns){
  let res = []
  data.forEach((item, ii)=>{
    let _id = item._id
    let _key = item._key
    let _data = item.data

    const tmp = {}
    columns.forEach((fild, jj)=>{
      for (const [key, value] of Object.entries(fild)) {
        if (key === 'id') {
          tmp.id = _id || (ii.toString())
        }
        if (value.input) {
          tmp[key] = _data[key] || value.input.value || ''
        }
      }
    })
    res.push(tmp)
  })
  return res
}